{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 获得当前项目所在的路径\n",
    "import os\n",
    "import json\n",
    "# pyecharts 的地图文档 https://pyecharts.org/#/zh-cn/geography_charts\n",
    "# 另外可参考的文章：https://blog.csdn.net/qq_31362537/article/details/90667814\n",
    "from pyecharts.charts import Geo\n",
    "from pyecharts import options\n",
    "from pyecharts.globals import GeoType\n",
    "\n",
    "# 爬虫抓到的文件路径\n",
    "SCRAPED_RESULT_DIR = os.path.join(os.path.dirname(os.getcwd()), 'results')\n",
    "\n",
    "def heatmap_of(city, title, filename):\n",
    "    # 加载数据集（以北京顺丰为例）\n",
    "    results = [json.loads(line) for line in open(os.path.join(SCRAPED_RESULT_DIR, filename))]\n",
    "    \n",
    "    # 移除没有地址的结果\n",
    "    results = [r for r in results if r['address'] != '']\n",
    "    # 生成地图\n",
    "    geo = Geo()\n",
    "    geo.add_schema(maptype=city)\n",
    "    geo.set_series_opts(label_opts=options.LabelOpts(is_show=False))\n",
    "    geo.set_global_opts(visualmap_opts=options.VisualMapOpts(),title_opts=options.TitleOpts(title=title))\n",
    "  \n",
    "    # 添加坐标\n",
    "    for r in results:\n",
    "        geo.add_coordinate(r['name'], r['location']['lng'], r['location']['lat'])\n",
    "    \n",
    "    # 添加数据对（这个看需求定义吧，这里示例下）\n",
    "    data_pair = [(r['name'], 50) for r in results]\n",
    "    \n",
    "    # GeoType.GeoType.EFFECT_SCATTER，GeoType.HEATMAP，GeoType.LINES\n",
    "    geo.add('geo', data_pair=data_pair, type_=GeoType.HEATMAP, symbol_size=12)\n",
    "    return geo"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "g = heatmap_of('北京', '顺丰热点图', '北京-北京-圆通.jl')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 238,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', '北京':'https://assets.pyecharts.org/assets/maps/beijing'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"cf36850c87c94c579d5912129b092c57\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', '北京'], function(echarts) {\n",
       "                var chart_cf36850c87c94c579d5912129b092c57 = echarts.init(\n",
       "                    document.getElementById('cf36850c87c94c579d5912129b092c57'), 'white', {renderer: 'canvas'});\n",
       "                var option_cf36850c87c94c579d5912129b092c57 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"heatmap\",\n",
       "            \"name\": \"geo\",\n",
       "            \"coordinateSystem\": \"geo\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u660c\\u5e73\\u4e0a\\u5317\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.34789084747659,\n",
       "                        40.088583818885496,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e09\\u5bb6\\u5e97\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.09954602483249,\n",
       "                        39.94833247384146,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u56fd\\u8d38\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.4587497423269,\n",
       "                        39.91888263496929,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u519b\\u533a\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.43401804417896,\n",
       "                        39.93450638867384,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u4e07\\u901a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4631475766121,\n",
       "                        39.92551632553798,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u4e07\\u8c6a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4390790075916,\n",
       "                        39.90904109159919,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u6708\\u575b\\u8425\\u4e1a\\u90e8\",\n",
       "                    \"value\": [\n",
       "                        116.35688216698706,\n",
       "                        39.904270820608325,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u94f6\\u6cf0\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.46572068291488,\n",
       "                        39.91263542006686,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u660c\\u5e73\\u4e0a\\u5317\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.34789084747659,\n",
       "                        40.088583818885496,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e09\\u5bb6\\u5e97\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.09954602483249,\n",
       "                        39.94833247384146,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u56fd\\u8d38\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.4587497423269,\n",
       "                        39.91888263496929,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u519b\\u533a\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.43401804417896,\n",
       "                        39.93450638867384,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u4e07\\u901a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4631475766121,\n",
       "                        39.92551632553798,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u4e07\\u8c6a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4390790075916,\n",
       "                        39.90904109159919,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u6708\\u575b\\u8425\\u4e1a\\u90e8\",\n",
       "                    \"value\": [\n",
       "                        116.35688216698706,\n",
       "                        39.904270820608325,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u94f6\\u6cf0\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.46572068291488,\n",
       "                        39.91263542006686,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u9999\\u7089\\u8425\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.39709153432611,\n",
       "                        39.896543735595685,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u6708\\u575b\\u5317\\u5c0f\\u8857\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.35241237843051,\n",
       "                        39.92433434955021,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5bc6\\u4e91\\u6c99\\u6cb3\\u4e1c\\u533a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.86655502181095,\n",
       "                        40.40164563963444,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u660c\\u5e73\\u661f\\u706b\\u8857\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.24122700252732,\n",
       "                        40.207290885369765,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u5c0f\\u5e84\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.48386384913046,\n",
       "                        39.927895154988974,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u751c\\u6c34\\u56ed\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.48028706608137,\n",
       "                        39.9364199812028,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u5de5\\u4f53\\u5357\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.45163264743245,\n",
       "                        39.92859438801704,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u96c5\\u5b9d\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.44876642404176,\n",
       "                        39.92506114721516,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u805a\\u9f99\\u82b1\\u56ed\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.45242764780878,\n",
       "                        39.929907488075045,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u4e1c\\u65b9\\u94f6\\u5ea7\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.44607330412285,\n",
       "                        39.94434604078797,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u91d1\\u5b9d\\u8857\\u8425\\u4e1a\\u90e8\",\n",
       "                    \"value\": [\n",
       "                        116.43401220519313,\n",
       "                        39.92486499284456,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u9886\\u884c\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.44413565913783,\n",
       "                        39.90145457772365,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u805a\\u5b9d\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.41574556059706,\n",
       "                        39.93867167015989,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u7075\\u5883\\u80e1\\u540c\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.38360100675364,\n",
       "                        39.920843357559576,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u897f\\u56db\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.3800001491169,\n",
       "                        39.93326896662087,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u901a\\u5dde\\u6768\\u5e84\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.65021242279037,\n",
       "                        39.91495714616031,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u901a\\u5dde\\u901a\\u987a\\u8857\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.66341535785384,\n",
       "                        39.916017122432365,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e30\\u53f0\\u9f0e\\u6052\\u4e2d\\u5fc3\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.28677903380223,\n",
       "                        39.8797772132829,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u901a\\u5dde\\u4e34\\u6cb3\\u91cc\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.66351318332386,\n",
       "                        39.89549465389813,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e30\\u53f0\\u97e9\\u5e84\\u5b50\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.30322296531513,\n",
       "                        39.84953308281605,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u901a\\u5dde\\u7d2b\\u8346\\u56ed\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.67849350566937,\n",
       "                        39.9053620280108,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e30\\u53f0\\u4e1c\\u5927\\u8857\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.28635916580687,\n",
       "                        39.87838541797312,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e30\\u53f0\\u4e94\\u91cc\\u5e97\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.26933133571248,\n",
       "                        39.87028719169246,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u77f3\\u666f\\u5c71\\u9c81\\u8c37\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.2207933009902,\n",
       "                        39.89800801987025,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5927\\u5174\\u91d1\\u8f85\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.35972198019574,\n",
       "                        39.74168508445716,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5927\\u5174\\u6797\\u6821\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.33854748203674,\n",
       "                        39.71357379764074,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u623f\\u5c71\\u78a7\\u6ce2\\u56ed\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.18605455222384,\n",
       "                        39.75592707381004,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u987a\\u4e49\\u822a\\u6e2f\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.62718759494193,\n",
       "                        40.1258524942206,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6000\\u67d4\\u5bcc\\u5bc6\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.62906424498283,\n",
       "                        40.30312176394907,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5bc6\\u4e91\\u6c34\\u6e90\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.86036345108343,\n",
       "                        40.369054408494534,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u987a\\u4e49\\u897f\\u8f9b\\u5357\\u533a\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.64783900980247,\n",
       "                        40.14007989593572,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5e73\\u8c37\\u7535\\u89c6\\u5854\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        117.12486581646081,\n",
       "                        40.16238549737345,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u660c\\u5e73\\u897f\\u5173\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.21800269785565,\n",
       "                        40.24964223077524,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u5149\\u534e\\u8def\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4587497423269,\n",
       "                        39.91888263496929,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u4ea4\\u6797\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4351079582542,\n",
       "                        39.96317157074633,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u6ee8\\u6cb3\\u8def\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.40852475453488,\n",
       "                        39.956695921286205,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6c38\\u5b9a\\u8def\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.25429190486443,\n",
       "                        39.927131108453274,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u4e09\\u91cc\\u6cb3\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.35079803359852,\n",
       "                        39.91739486626092,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u77f3\\u666f\\u5c71\\u83b2\\u77f3\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.23600476452985,\n",
       "                        39.90078609727799,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u987a\\u4e49\\u805a\\u798f\\u7965\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.65377914481775,\n",
       "                        40.127735513388416,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u9f0e\\u597d\\u5927\\u53a6\\u4e00\\u671f\\u697c\\u4e0a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.31973103584144,\n",
       "                        39.98329005401969,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u53cc\\u5b89\\u5546\\u573a\\u53572\\u5546\\u8d85\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.3324879622192,\n",
       "                        39.97221221807413,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u5efa\\u5916SOHO\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.4473701877876,\n",
       "                        39.910086562968594,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u4e1c\\u57ce\\u4fca\\u666f\\u82d1\\u5c0f\\u533a\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.44564813612499,\n",
       "                        39.94225350879567,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u4f5f\\u9e9f\\u9601\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.3746625974377,\n",
       "                        39.90449394807124,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u897f\\u57ce\\u519b\\u4e8b\\u535a\\u7269\\u9986\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.34674434015419,\n",
       "                        39.90401863380335,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u671d\\u5916soho\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.46165099963248,\n",
       "                        39.92576208667307,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u4e09\\u91cc\\u5c6f\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.46254912548136,\n",
       "                        39.92827700212732,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u77f3\\u666f\\u5c71\\u749f\\u4e0a\\u749f\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.20636020929358,\n",
       "                        39.8945287420826,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u5ef6\\u5e86\\u516b\\u8fbe\\u5cad\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.0029815960708,\n",
       "                        40.44811243550886,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u671d\\u9633\\u5efa\\u5916SOHO\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.46647728073067,\n",
       "                        39.87390250014566,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u957f\\u667a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.3054340544974,\n",
       "                        39.96548984110075,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u4e39\\u68f1\\u8857\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.31658597842046,\n",
       "                        39.98343607574141,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u5f69\\u548c\\u574a\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.3644693981549,\n",
       "                        39.96639961527484,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u4ebf\\u4e16\\u754c\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.31973103584144,\n",
       "                        39.98329005401969,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u4e07\\u6cc9\\u5e84\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.30953904118633,\n",
       "                        39.97206105745348,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u88d5\\u6cfd\\u56ed\\u8425\\u4e1a\\u90e8\",\n",
       "                    \"value\": [\n",
       "                        116.29812813578474,\n",
       "                        39.9424973250762,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6c49\\u5a01\\u5927\\u53a6CBD\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.46125502656368,\n",
       "                        39.91967810886933,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u5317\\u7406\\u5de5\\u6d77\\u6dc0\\u6821\\u533a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.32655348652862,\n",
       "                        39.992545467676635,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u4e2d\\u53d1\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.325394223268,\n",
       "                        39.98140922742473,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5317\\u4eac\\u6d77\\u6dc0\\u534a\\u58c1\\u8857\\u5357\\u8def\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.30461929139983,\n",
       "                        39.95813887416852,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u4eba\\u6c11\\u5927\\u5b66\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.30478080673053,\n",
       "                        39.958051698582075,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5927\\u65b9\\u5bb6\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.43401220519313,\n",
       "                        39.92486499284456,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u6052\\u57fa\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.4361398417935,\n",
       "                        39.91317812251729,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u4e1c\\u65b9\\u5e7f\\u573a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.42223126529433,\n",
       "                        39.91598722604309,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u65b0\\u4e1c\\u5b89\\u5e7f\\u573a\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.41832797065001,\n",
       "                        39.920571864562824,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u897f\\u56fd\\u8d38\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.32024961413778,\n",
       "                        39.86113330029535,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u5218\\u5e84\\u5b50\\u8425\\u4e1a\\u7ad9\",\n",
       "                    \"value\": [\n",
       "                        116.26780394685387,\n",
       "                        39.851219292575095,\n",
       "                        50\n",
       "                    ]\n",
       "                },\n",
       "                {\n",
       "                    \"name\": \"\\u987a\\u4e30\\u5feb\\u9012\\u91d1\\u878d\\u8857\\u901f\\u8fd0\\u8425\\u4e1a\\u70b9\",\n",
       "                    \"value\": [\n",
       "                        116.37995101180549,\n",
       "                        39.922209521519655,\n",
       "                        50\n",
       "                    ]\n",
       "                }\n",
       "            ],\n",
       "            \"pointSize\": 20,\n",
       "            \"blurSize\": 20\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"geo\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"geo\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"formatter\": function (params) {        return params.name + ' : ' + params.value[2];    },\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u987a\\u4e30\\u70ed\\u70b9\\u56fe\"\n",
       "        }\n",
       "    ],\n",
       "    \"visualMap\": {\n",
       "        \"show\": true,\n",
       "        \"type\": \"continuous\",\n",
       "        \"min\": 0,\n",
       "        \"max\": 100,\n",
       "        \"inRange\": {\n",
       "            \"color\": [\n",
       "                \"#50a3ba\",\n",
       "                \"#eac763\",\n",
       "                \"#d94e5d\"\n",
       "            ]\n",
       "        },\n",
       "        \"calculable\": true,\n",
       "        \"splitNumber\": 5,\n",
       "        \"orient\": \"vertical\",\n",
       "        \"showLabel\": true,\n",
       "        \"itemWidth\": 20,\n",
       "        \"itemHeight\": 140\n",
       "    },\n",
       "    \"geo\": {\n",
       "        \"map\": \"\\u5317\\u4eac\",\n",
       "        \"roam\": true,\n",
       "        \"emphasis\": {}\n",
       "    }\n",
       "};\n",
       "                chart_cf36850c87c94c579d5912129b092c57.setOption(option_cf36850c87c94c579d5912129b092c57);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x10fe54cc0>"
      ]
     },
     "execution_count": 238,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "g.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
